import json
import os


work_dir = os.path.abspath(sys.argv[0])
file_path = '/'.join(work_dir.split(r'/')[:-1])
os.chdir(file_path)

cofing_file = file_path+'/config.json'

config_dic = dict(
    db='../db/schedule.csv'
)

#! json的读写是对磁盘的IO
with open(cofing_file, 'w') as json_obj:
    # json_obj.write(json.dumps(config_dic))
    json.dump(config_dic, json_obj)
